package com.heima.article.controller.v1;

import com.heima.article.service.ApCollectionService;
import com.heima.model.article.dto.CollectionBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by ZYJ on 2021/6/5 0:57
 */
@Api("用户收藏行为APi")
@RestController
@RequestMapping("api/v1/collection_behavior/")
public class ApCollectionController {
    @Autowired
    ApCollectionService apCollectionService;
    @PostMapping
    @ApiOperation("收藏与取消收藏")
    public ResponseResult collectBehavior(@RequestBody CollectionBehaviorDto dto){
       return apCollectionService.collection(dto);
    }
}
